import com.nepenthe.Utils.MybatisUtils;
import com.nepenthe.dao.UserMapper;
import com.nepenthe.pojo.User;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class Mytest {
    @Test
    public void addUser() {
        SqlSession sqlSession = MybatisUtils.getsqlSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        User user = new User(0, "张政", "123123", "650103200110186013", "203776");
        mapper.addUser(user);
        sqlSession.commit();
        sqlSession.close();
    }

    @Test
    public void islogin() {
        SqlSession sqlSession = MybatisUtils.getsqlSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        User user = mapper.queryUser("203764", "123123");
        System.out.println(user);
    }


}
